/**
 * 返回的json格式
 * @type {Object}
 * {
   data: {},
   success: [true, false]
   msg: ""
  }
 */

/**
 * 创建json
 * @param  [Object] options 返回数据参数
 * @return [Object]         返回json数据
 * {
   data: {},
   success: [true, false]
   msg: ""
  }
 *
 */
module.exports = function createJSON (options) {
  var data = options.data || {}
  var success = options.success || true
  var msg = options.msg || "返回成功"
  var json = {
    data: data,
    success: success,
    msg: msg
  }
  return json
}
